package com.gec.auction.pojo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 
 * @TableName auctionrecord
 */
public class Auctionrecord implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 
     */
    private Integer userid;

    /**
     * 
     */
    private Integer auctionid;

    /**
     * 
     */
    private Date auctiontime;

    /**
     * 
     */
    private BigDecimal auctionprice;

    private static final long serialVersionUID = 1L;

    private User user;  //竞拍人
    public User getUser() {
        return user;
    }
    public void setUser(User user) {
        this.user = user;
    }

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 
     */
    public Integer getUserid() {
        return userid;
    }

    /**
     * 
     */
    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    /**
     * 
     */
    public Integer getAuctionid() {
        return auctionid;
    }

    /**
     * 
     */
    public void setAuctionid(Integer auctionid) {
        this.auctionid = auctionid;
    }

    /**
     * 
     */
    public Date getAuctiontime() {
        return auctiontime;
    }

    /**
     * 
     */
    public void setAuctiontime(Date auctiontime) {
        this.auctiontime = auctiontime;
    }

    /**
     * 
     */
    public BigDecimal getAuctionprice() {
        return auctionprice;
    }

    /**
     * 
     */
    public void setAuctionprice(BigDecimal auctionprice) {
        this.auctionprice = auctionprice;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Auctionrecord other = (Auctionrecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getAuctionid() == null ? other.getAuctionid() == null : this.getAuctionid().equals(other.getAuctionid()))
            && (this.getAuctiontime() == null ? other.getAuctiontime() == null : this.getAuctiontime().equals(other.getAuctiontime()))
            && (this.getAuctionprice() == null ? other.getAuctionprice() == null : this.getAuctionprice().equals(other.getAuctionprice()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getAuctionid() == null) ? 0 : getAuctionid().hashCode());
        result = prime * result + ((getAuctiontime() == null) ? 0 : getAuctiontime().hashCode());
        result = prime * result + ((getAuctionprice() == null) ? 0 : getAuctionprice().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userid=").append(userid);
        sb.append(", auctionid=").append(auctionid);
        sb.append(", auctiontime=").append(auctiontime);
        sb.append(", auctionprice=").append(auctionprice);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}